<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
<f:view>
	<head>
<f:loadBundle basename="messages" var="msgs" />

<title><h:outputText value="#{msgs.title}" /></title>
<link href="${facesContext.externalContext.requestContextPath}/views/css/login.css" rel="stylesheet" type="text/css" />

<style type="text/css" title="currentStyle">
	@import "${facesContext.externalContext.requestContextPath}/views/css/theme.css";
</style>
	</head>
	<body>
		
		<ui:include src="header/header.xhtml" />
		<br></br>
		<br></br>
		
		
		
		<h:form id="loginForm" prependId="false">
			<div id="login_div">
				<h3 class="login_header">Please enter your name and password</h3>
				<table class="login_table_div">
					<tr>
						<td><h:outputText value="#{msgs.username}" /></td>
						<td><h:inputText id="j_username" value="#{login.username}" required="true" /> 
						<h:message for="j_username" errorClass="errorblock"></h:message>
						</td>
					</tr>
					<tr>
						<td><h:outputText value="#{msgs.password}" /></td>
						<td><h:inputSecret id="j_password" value="#{login.password}"/> 
						</td>
					</tr>
					<tr>

						<td><h:commandButton id="login" type="submit"
								value="#{msgs.login}" action="#{ login.loginAction}" />
						<h:message for="login" errorClass="errorblock">
						</h:message>		
						</td>
						<td><a
							href="${facesContext.externalContext.requestContextPath}/views/register.faces"><h:outputText
									value="#{msg.register }"></h:outputText> </a></td>
					</tr>
					
				</table>
				<h:messages globalOnly="true" errorClass="errorblock">
				</h:messages>
			</div>
			<p></p>

		</h:form>
		<div>
		
		</div>
		
		<ui:include src="footer/footer.xhtml" />
	</body>
</f:view>
</html>
